package com.dzm.xgb.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 作者：Dzm
 * 时间：2024-09-19-14:44
 * 功能：
 */

@Getter
@AllArgsConstructor
public enum BorrowerStatusEnum {
    NO_AUTH(0, "未认证"),
    AUTH_RUN(1, "认证中"),
    AUTH_OK(2, "认证成功"),
    AUTH_FAIL(-1, "认证失败"),
    ;

    private Integer status;
    private String msg;

    public static String getMsgByStatus(Integer status) {
        for (BorrowerStatusEnum value : BorrowerStatusEnum.values()) {
            if(value.status.equals(status)) {
                return value.msg;
            }
        }

        return null;
    }
}
